namespace alpha_cplusplus_DeleteWithNonVirtualDtor {
    class NonVirtual {};
    class NVDerived : public NonVirtual {};

    NonVirtual* create() {
        NonVirtual* x = new NVDerived(); // note: Casting from 'NVDerived' to
                                         //       'NonVirtual' here
        return x;
    }

    void foo() {
        NonVirtual* x = create();
        delete x; // warn: destruction of a polymorphic object with no virtual
                  //       destructor
    }
}